package com.wangy.database.jdbc;

import java.sql.SQLException;
import java.util.List;

public interface JdbcTemplate {

	public int delete(String sql, Object... params) throws SQLException;

	public int insert(String sql, Object... params) throws SQLException;

	public int update(String sql,Object... params) throws SQLException;

	public <T> T queryUnique(String sql,Class<T> clazz, Object... params) throws SQLException;

	public <T> List<T> queryList(String sql,Class<T> clazz, Object... params) throws SQLException;

	public <T> List<T> queryList(String sql,Class<T> clazz, Integer start, Integer size, Object... params)
			throws SQLException;

	public <T> List<T> queryList(String sql, Class<T> clazz, Integer start, Integer size, String orderBy,
			Object... params) throws SQLException;
	
	public <T> long queryCount(Class<T> clazz) throws SQLException;
	
	public long queryCount(String sql,Object...params) throws SQLException;;
	
	public void execute(String sql) throws SQLException;
	
	public <T> List<T> queryAll(Class<T> clazz) throws SQLException;

	public <T> List<T> queryList(String sql, Class<T> clazz, String orderBy,
			Object...params) throws SQLException;

}
